kanzi::InputManager Class Reference

InputManager converts the events from the given event queue into input specific messages. More...

#include <kanzi/core.ui/input/input_manager.hpp>

Public Member Functions

 InputManager (Domain *domain)
 Create an input manager. More...
 
virtual ~InputManager ()
 
FocusManagergetFocusManager () const
 Returns the instance of the focus manager. More...
 
void processEvents (const struct KzsEventQueue *queue, Node2D *node)
 Processes a queue of input events. More...
 
NodeSharedPtr setFocus (NodeSharedPtr newFocusNode)
 Attempts to set focus to a node. More...
 
NodeSharedPtr getFocus () const
 Gets currently focused node. More...
 
void notifyNodeDetached (Node &node)
 Node notifies the input manager that Kanzi is detaching it from the scene graph. More...
 

Friends

class InputManipulator
 

Detailed Description

InputManager converts the events from the given event queue into input specific messages.

The events supported are key, touch, and mouse pointer events. The key events are dispatched through Keyboard::KeyDownMessage and Keyboard::KeyUpMessage. The touch and pointer events are unified into press, change and release messages, and forwarded to InputManipulators, which in turn handles the input and dispatch those through proprietary messages. The input manipulators are gathered automatically from the node or its children passed as argument to the processEvents() method.

See also
Keyboard, InputManipulator

Constructor & Destructor Documentation

kanzi::InputManager::InputManager ( Domain domain)
explicit

Create an input manager.

Parameters
domainThe domain that owns the input manager.
virtual kanzi::InputManager::~InputManager ( )
virtual

Member Function Documentation

FocusManager* kanzi::InputManager::getFocusManager ( ) const

Returns the instance of the focus manager.

Returns
Instance of the focus manager.
void kanzi::InputManager::processEvents ( const struct KzsEventQueue *  queue,
Node2D node 
)

Processes a queue of input events.

Parameters
queueEvent queue that holds events that are processed.
nodeA node whose subtree can receive events that are processed.
NodeSharedPtr kanzi::InputManager::setFocus ( NodeSharedPtr  newFocusNode)

Attempts to set focus to a node.

Deprecated:
in version 3.6.3. Use FocusManager's trySetActiveFocus() instead.
NodeSharedPtr kanzi::InputManager::getFocus ( ) const

Gets currently focused node.

Deprecated:
in version 3.6.3. Use FocusManager's getActiveFocus() instead.
void kanzi::InputManager::notifyNodeDetached ( Node node)

Node notifies the input manager that Kanzi is detaching it from the scene graph.

Parameters
nodeThe node which is detached.

Friends And Related Function Documentation

friend class InputManipulator
friend

The documentation for this class was generated from the following file: